﻿function Show(urlPath, idOfDiv) {
    $.ajax({
        type: "POST",
        url: urlPath,
        dataType: "html",
        contentType: "application/json",
        success: function(result) {
            $("#" + idOfDiv).html(result.toString());
        },
        error: function() {
            //            alert("ajax has error");
        }
    });
}

function ShowPaging(page, id, urlPath, div) {
    var param = {
        PageIndex: page,
        Id: id
    };
    var jsonParams = $.toJSON(param);
    $.ajax({
        type: "POST",
        data: jsonParams,
        url: urlPath,
        dataType: "html",
        contentType: "application/json",
        success: function(result) {
            $("#" + div).html(result.toString());

        },
        error: function() {
            //            alert("ajax has error");
        }
    });
}
function ShowPagingParam(page, id,idParam, urlPath, div) {
    var param = {
        PageIndex: page,
        Id: id,
        IdParam: idParam
    };
    var jsonParams = $.toJSON(param);
    $.ajax({
        type: "POST",
        data: jsonParams,
        url: urlPath,
        dataType: "html",
        contentType: "application/json",
        success: function(result) {
            $("#" + div).html(result.toString());

        },
        error: function() {
            //            alert("ajax has error");
        }
    });
}
function ShowPressPaging(page, idPress,idPressCategory, urlPath, div) {
    var param = {
        PageIndex: page,
        IdPress: idPress,
        IdPressCategory: idPressCategory
    };
    var jsonParams = $.toJSON(param);
    $.ajax({
        type: "POST",
        data: jsonParams,
        url: urlPath,
        dataType: "html",
        contentType: "application/json",
        success: function(result) {
            $("#" + div).html(result.toString());

        },
        error: function() {
            //            alert("ajax has error");
        }
    });
}